def BMI(height,weight):
    b = weight/(height*height)
    if (b>32):
        print("严重肥胖")
    elif b>28:
        print("肥胖")
    elif b>25:
        print("过重")
    elif b>18.5:
        print("正常")
    else:
        print("过轻")

height = None
weight = None
while True:
    try:
        height = float(input("请输入你的身高(m):"))
        weight = float(input("请输入你的体重(kg):"))
        break
    except ValueError:
        print("请输入数字！")
BMI(height,weight)



